import request from '@/utils/request'

// 查询微信用户列表
export function listwechatUser(query) {
  return request({
    url: '/business/wechatUser/list',
    method: 'get',
    params: query
  })
}

// 查询微信用户详细
export function getwechatUser(id) {
  return request({
    url: '/business/wechatUser/' + id,
    method: 'get'
  })
}

// 新增微信用户
export function addwechatUser(data) {
  return request({
    url: '/business/wechatUser',
    method: 'post',
    data: data
  })
}

// 修改微信用户
export function updatewechatUser(data) {
  return request({
    url: '/business/wechatUser',
    method: 'put',
    data: data
  })
}

// 删除微信用户
export function delwechatUser(id) {
  return request({
    url: '/business/wechatUser/' + id,
    method: 'delete'
  })
}

// 导出微信用户
export function exportwechatUser(query) {
  return request({
    url: '/business/wechatUser/export',
    method: 'get',
    params: query
  })
}

// /system/agent/getMerchantList/{userId}

export function getMerchantList(userId) {
  return request({
    url: `/system/agent/getMerchantList/${userId}`,
    method: 'get'
  })
}